#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int gcd(int x, int y)
{
    return y == 0 ? x : gcd(y, x % y);
}